{% extends "base.html" %}
{% load helpers %}
{% load static %}
{% load ui_framework %}

{% block drawer %}
    {% table_config_form table %}
{% endblock %}

{% block content %}
    <div class="row d-print-none mb-16">
        <div class="col-lg-12">
            <div class="float-end d-print-none">
                <div class="btn-group" role="group">
                    <a href="{% django_querystring display='list' %}"
                       class="btn btn-primary{% if display == 'list' %} bg-primary nb-text-body-bg{% endif %}">
                        <span class="mdi mdi-view-sequential" aria-hidden="true"></span> List
                    </a>
                    {# djlint:off B123 #}
                    <a href="{% django_querystring display='tiles' %}"
                       class="btn btn-primary{% if display == 'tiles' %} bg-primary nb-text-body-bg{% endif %}">
                        <span class="mdi mdi-view-grid" aria-hidden="true"></span> Tiles
                    </a>
                    {# djlint:on B123 #}
                </div>

                <a class="btn btn-primary" href="{% url 'apps:apps_marketplace' %}">Visit Apps Marketplace</a>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            {% if filter_form %}
                <div class="col-lg-3 float-end nb-right-side-panel d-print-none">
                    {% include 'inc/search_panel.html' %}
                    {% block sidebar %}{% endblock %}
                </div>
            {% endif %}
            {% include table_template|default:'responsive_table.html' %}
            {% include 'inc/paginator.html' with paginator=table.paginator page=table.page %}
            <div class="clearfix"></div>
        </div>
    </div>
{% endblock %}

{% block javascript %}
    {{ block.super }}
    <script src="{% static 'js/tableconfig.js' %}"></script>
{% endblock %}
